package com.android.jingweiapp.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by cuiwenrui-pc on 15/11/8.
 */
public class PicNewsBean implements Parcelable {
    /**
     * content :
     * path : images/UploadImg/IMG_6440140610.jpg
     */

    private List<DataEntity> data;

    public void setData(List<DataEntity> data) {
        this.data = data;
    }

    public List<DataEntity> getData() {
        return data;
    }

    public static class DataEntity implements Parcelable {
        private String content;
        private String path;
        private String pic_desc;//图片描述

        public String getPicDesc() {
            return pic_desc;
        }

        public void setPicDesc(String picDesc) {
            this.pic_desc = picDesc;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public void setPath(String path) {
            this.path = path;
        }

        public String getContent() {
            return content;
        }

        public String getPath() {
            return path;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.content);
            dest.writeString(this.path);
        }

        public DataEntity() {
        }

        protected DataEntity(Parcel in) {
            this.content = in.readString();
            this.path = in.readString();
        }

        public static final Creator<DataEntity> CREATOR = new Creator<DataEntity>() {
            public DataEntity createFromParcel(Parcel source) {
                return new DataEntity(source);
            }

            public DataEntity[] newArray(int size) {
                return new DataEntity[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeList(this.data);
    }

    public PicNewsBean() {
    }

    protected PicNewsBean(Parcel in) {
        this.data = new ArrayList<DataEntity>();
        in.readList(this.data, List.class.getClassLoader());
    }

    public static final Parcelable.Creator<PicNewsBean> CREATOR = new Parcelable.Creator<PicNewsBean>() {
        public PicNewsBean createFromParcel(Parcel source) {
            return new PicNewsBean(source);
        }

        public PicNewsBean[] newArray(int size) {
            return new PicNewsBean[size];
        }
    };
}
